<?php


abstract class BaseTblStructure extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $f_id;


	
	protected $created_on;


	
	protected $updated_on;


	
	protected $f_name;


	
	protected $f_description;


	
	protected $f_level;


	
	protected $f_parentid;


	
	protected $f_seq_no;


	
	protected $f_image;


	
	protected $f_icon;


	
	protected $f_content;


	
	protected $f_link;


	
	protected $f_meta_keyword;


	
	protected $f_meta_description;


	
	protected $f_status;


	
	protected $f_layout_id = 0;


	
	protected $f_updated_uid;


	
	protected $f_updated_datetime;


	
	protected $f_created_uid;


	
	protected $f_created_datetime;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getFId()
	{

		return $this->f_id;
	}

	
	public function getCreatedOn($format = 'Y-m-d H:i:s')
	{

		if ($this->created_on === null || $this->created_on === '') {
			return null;
		} elseif (!is_int($this->created_on)) {
						$ts = strtotime($this->created_on);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [created_on] as date/time value: " . var_export($this->created_on, true));
			}
		} else {
			$ts = $this->created_on;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getUpdatedOn($format = 'Y-m-d H:i:s')
	{

		if ($this->updated_on === null || $this->updated_on === '') {
			return null;
		} elseif (!is_int($this->updated_on)) {
						$ts = strtotime($this->updated_on);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [updated_on] as date/time value: " . var_export($this->updated_on, true));
			}
		} else {
			$ts = $this->updated_on;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getFName()
	{

		return $this->f_name;
	}

	
	public function getFDescription()
	{

		return $this->f_description;
	}

	
	public function getFLevel()
	{

		return $this->f_level;
	}

	
	public function getFParentid()
	{

		return $this->f_parentid;
	}

	
	public function getFSeqNo()
	{

		return $this->f_seq_no;
	}

	
	public function getFImage()
	{

		return $this->f_image;
	}

	
	public function getFIcon()
	{

		return $this->f_icon;
	}

	
	public function getFContent()
	{

		return $this->f_content;
	}

	
	public function getFLink()
	{

		return $this->f_link;
	}

	
	public function getFMetaKeyword()
	{

		return $this->f_meta_keyword;
	}

	
	public function getFMetaDescription()
	{

		return $this->f_meta_description;
	}

	
	public function getFStatus()
	{

		return $this->f_status;
	}

	
	public function getFLayoutId()
	{

		return $this->f_layout_id;
	}

	
	public function getFUpdatedUid()
	{

		return $this->f_updated_uid;
	}

	
	public function getFUpdatedDatetime($format = 'Y-m-d H:i:s')
	{

		if ($this->f_updated_datetime === null || $this->f_updated_datetime === '') {
			return null;
		} elseif (!is_int($this->f_updated_datetime)) {
						$ts = strtotime($this->f_updated_datetime);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [f_updated_datetime] as date/time value: " . var_export($this->f_updated_datetime, true));
			}
		} else {
			$ts = $this->f_updated_datetime;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getFCreatedUid()
	{

		return $this->f_created_uid;
	}

	
	public function getFCreatedDatetime($format = 'Y-m-d H:i:s')
	{

		if ($this->f_created_datetime === null || $this->f_created_datetime === '') {
			return null;
		} elseif (!is_int($this->f_created_datetime)) {
						$ts = strtotime($this->f_created_datetime);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [f_created_datetime] as date/time value: " . var_export($this->f_created_datetime, true));
			}
		} else {
			$ts = $this->f_created_datetime;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function setFId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_id !== $v) {
			$this->f_id = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_ID;
		}

	} 

	
	public function setCreatedOn($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [created_on] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->created_on !== $ts) {
			$this->created_on = $ts;
			$this->modifiedColumns[] = TblStructurePeer::CREATED_ON;
		}

	} 

	
	public function setUpdatedOn($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [updated_on] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->updated_on !== $ts) {
			$this->updated_on = $ts;
			$this->modifiedColumns[] = TblStructurePeer::UPDATED_ON;
		}

	} 

	
	public function setFName($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_name !== $v) {
			$this->f_name = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_NAME;
		}

	} 

	
	public function setFDescription($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_description !== $v) {
			$this->f_description = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_DESCRIPTION;
		}

	} 

	
	public function setFLevel($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_level !== $v) {
			$this->f_level = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_LEVEL;
		}

	} 

	
	public function setFParentid($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_parentid !== $v) {
			$this->f_parentid = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_PARENTID;
		}

	} 

	
	public function setFSeqNo($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_seq_no !== $v) {
			$this->f_seq_no = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_SEQ_NO;
		}

	} 

	
	public function setFImage($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_image !== $v) {
			$this->f_image = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_IMAGE;
		}

	} 

	
	public function setFIcon($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_icon !== $v) {
			$this->f_icon = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_ICON;
		}

	} 

	
	public function setFContent($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_content !== $v) {
			$this->f_content = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_CONTENT;
		}

	} 

	
	public function setFLink($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_link !== $v) {
			$this->f_link = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_LINK;
		}

	} 

	
	public function setFMetaKeyword($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_meta_keyword !== $v) {
			$this->f_meta_keyword = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_META_KEYWORD;
		}

	} 

	
	public function setFMetaDescription($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_meta_description !== $v) {
			$this->f_meta_description = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_META_DESCRIPTION;
		}

	} 

	
	public function setFStatus($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->f_status !== $v) {
			$this->f_status = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_STATUS;
		}

	} 

	
	public function setFLayoutId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_layout_id !== $v || $v === 0) {
			$this->f_layout_id = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_LAYOUT_ID;
		}

	} 

	
	public function setFUpdatedUid($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_updated_uid !== $v) {
			$this->f_updated_uid = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_UPDATED_UID;
		}

	} 

	
	public function setFUpdatedDatetime($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [f_updated_datetime] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->f_updated_datetime !== $ts) {
			$this->f_updated_datetime = $ts;
			$this->modifiedColumns[] = TblStructurePeer::F_UPDATED_DATETIME;
		}

	} 

	
	public function setFCreatedUid($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->f_created_uid !== $v) {
			$this->f_created_uid = $v;
			$this->modifiedColumns[] = TblStructurePeer::F_CREATED_UID;
		}

	} 

	
	public function setFCreatedDatetime($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [f_created_datetime] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->f_created_datetime !== $ts) {
			$this->f_created_datetime = $ts;
			$this->modifiedColumns[] = TblStructurePeer::F_CREATED_DATETIME;
		}

	} 

	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->f_id = $rs->getInt($startcol + 0);

			$this->created_on = $rs->getTimestamp($startcol + 1, null);

			$this->updated_on = $rs->getTimestamp($startcol + 2, null);

			$this->f_name = $rs->getString($startcol + 3);

			$this->f_description = $rs->getString($startcol + 4);

			$this->f_level = $rs->getInt($startcol + 5);

			$this->f_parentid = $rs->getInt($startcol + 6);

			$this->f_seq_no = $rs->getInt($startcol + 7);

			$this->f_image = $rs->getString($startcol + 8);

			$this->f_icon = $rs->getString($startcol + 9);

			$this->f_content = $rs->getString($startcol + 10);

			$this->f_link = $rs->getString($startcol + 11);

			$this->f_meta_keyword = $rs->getString($startcol + 12);

			$this->f_meta_description = $rs->getString($startcol + 13);

			$this->f_status = $rs->getString($startcol + 14);

			$this->f_layout_id = $rs->getInt($startcol + 15);

			$this->f_updated_uid = $rs->getInt($startcol + 16);

			$this->f_updated_datetime = $rs->getTimestamp($startcol + 17, null);

			$this->f_created_uid = $rs->getInt($startcol + 18);

			$this->f_created_datetime = $rs->getTimestamp($startcol + 19, null);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 20; 
		} catch (Exception $e) {
			throw new PropelException("Error populating TblStructure object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TblStructurePeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			TblStructurePeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
    if ($this->isNew() && !$this->isColumnModified(TblStructurePeer::CREATED_ON))
    {
      $this->setCreatedOn(time());
    }

    if ($this->isModified() && !$this->isColumnModified(TblStructurePeer::UPDATED_ON))
    {
      $this->setUpdatedOn(time());
    }

		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TblStructurePeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 
		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


			
			if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = TblStructurePeer::doInsert($this, $con);
					$affectedRows += 1; 
										 
										 

					$this->setFId($pk);  

					$this->setNew(false);
				} else {
					$affectedRows += TblStructurePeer::doUpdate($this, $con);
				}
				$this->resetModified(); 
			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 

	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = TblStructurePeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TblStructurePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getFId();
				break;
			case 1:
				return $this->getCreatedOn();
				break;
			case 2:
				return $this->getUpdatedOn();
				break;
			case 3:
				return $this->getFName();
				break;
			case 4:
				return $this->getFDescription();
				break;
			case 5:
				return $this->getFLevel();
				break;
			case 6:
				return $this->getFParentid();
				break;
			case 7:
				return $this->getFSeqNo();
				break;
			case 8:
				return $this->getFImage();
				break;
			case 9:
				return $this->getFIcon();
				break;
			case 10:
				return $this->getFContent();
				break;
			case 11:
				return $this->getFLink();
				break;
			case 12:
				return $this->getFMetaKeyword();
				break;
			case 13:
				return $this->getFMetaDescription();
				break;
			case 14:
				return $this->getFStatus();
				break;
			case 15:
				return $this->getFLayoutId();
				break;
			case 16:
				return $this->getFUpdatedUid();
				break;
			case 17:
				return $this->getFUpdatedDatetime();
				break;
			case 18:
				return $this->getFCreatedUid();
				break;
			case 19:
				return $this->getFCreatedDatetime();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TblStructurePeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getFId(),
			$keys[1] => $this->getCreatedOn(),
			$keys[2] => $this->getUpdatedOn(),
			$keys[3] => $this->getFName(),
			$keys[4] => $this->getFDescription(),
			$keys[5] => $this->getFLevel(),
			$keys[6] => $this->getFParentid(),
			$keys[7] => $this->getFSeqNo(),
			$keys[8] => $this->getFImage(),
			$keys[9] => $this->getFIcon(),
			$keys[10] => $this->getFContent(),
			$keys[11] => $this->getFLink(),
			$keys[12] => $this->getFMetaKeyword(),
			$keys[13] => $this->getFMetaDescription(),
			$keys[14] => $this->getFStatus(),
			$keys[15] => $this->getFLayoutId(),
			$keys[16] => $this->getFUpdatedUid(),
			$keys[17] => $this->getFUpdatedDatetime(),
			$keys[18] => $this->getFCreatedUid(),
			$keys[19] => $this->getFCreatedDatetime(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TblStructurePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setFId($value);
				break;
			case 1:
				$this->setCreatedOn($value);
				break;
			case 2:
				$this->setUpdatedOn($value);
				break;
			case 3:
				$this->setFName($value);
				break;
			case 4:
				$this->setFDescription($value);
				break;
			case 5:
				$this->setFLevel($value);
				break;
			case 6:
				$this->setFParentid($value);
				break;
			case 7:
				$this->setFSeqNo($value);
				break;
			case 8:
				$this->setFImage($value);
				break;
			case 9:
				$this->setFIcon($value);
				break;
			case 10:
				$this->setFContent($value);
				break;
			case 11:
				$this->setFLink($value);
				break;
			case 12:
				$this->setFMetaKeyword($value);
				break;
			case 13:
				$this->setFMetaDescription($value);
				break;
			case 14:
				$this->setFStatus($value);
				break;
			case 15:
				$this->setFLayoutId($value);
				break;
			case 16:
				$this->setFUpdatedUid($value);
				break;
			case 17:
				$this->setFUpdatedDatetime($value);
				break;
			case 18:
				$this->setFCreatedUid($value);
				break;
			case 19:
				$this->setFCreatedDatetime($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TblStructurePeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setFId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setCreatedOn($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setUpdatedOn($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setFName($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setFDescription($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setFLevel($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setFParentid($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setFSeqNo($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setFImage($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setFIcon($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setFContent($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setFLink($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setFMetaKeyword($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setFMetaDescription($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setFStatus($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setFLayoutId($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setFUpdatedUid($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setFUpdatedDatetime($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setFCreatedUid($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setFCreatedDatetime($arr[$keys[19]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(TblStructurePeer::DATABASE_NAME);

		if ($this->isColumnModified(TblStructurePeer::F_ID)) $criteria->add(TblStructurePeer::F_ID, $this->f_id);
		if ($this->isColumnModified(TblStructurePeer::CREATED_ON)) $criteria->add(TblStructurePeer::CREATED_ON, $this->created_on);
		if ($this->isColumnModified(TblStructurePeer::UPDATED_ON)) $criteria->add(TblStructurePeer::UPDATED_ON, $this->updated_on);
		if ($this->isColumnModified(TblStructurePeer::F_NAME)) $criteria->add(TblStructurePeer::F_NAME, $this->f_name);
		if ($this->isColumnModified(TblStructurePeer::F_DESCRIPTION)) $criteria->add(TblStructurePeer::F_DESCRIPTION, $this->f_description);
		if ($this->isColumnModified(TblStructurePeer::F_LEVEL)) $criteria->add(TblStructurePeer::F_LEVEL, $this->f_level);
		if ($this->isColumnModified(TblStructurePeer::F_PARENTID)) $criteria->add(TblStructurePeer::F_PARENTID, $this->f_parentid);
		if ($this->isColumnModified(TblStructurePeer::F_SEQ_NO)) $criteria->add(TblStructurePeer::F_SEQ_NO, $this->f_seq_no);
		if ($this->isColumnModified(TblStructurePeer::F_IMAGE)) $criteria->add(TblStructurePeer::F_IMAGE, $this->f_image);
		if ($this->isColumnModified(TblStructurePeer::F_ICON)) $criteria->add(TblStructurePeer::F_ICON, $this->f_icon);
		if ($this->isColumnModified(TblStructurePeer::F_CONTENT)) $criteria->add(TblStructurePeer::F_CONTENT, $this->f_content);
		if ($this->isColumnModified(TblStructurePeer::F_LINK)) $criteria->add(TblStructurePeer::F_LINK, $this->f_link);
		if ($this->isColumnModified(TblStructurePeer::F_META_KEYWORD)) $criteria->add(TblStructurePeer::F_META_KEYWORD, $this->f_meta_keyword);
		if ($this->isColumnModified(TblStructurePeer::F_META_DESCRIPTION)) $criteria->add(TblStructurePeer::F_META_DESCRIPTION, $this->f_meta_description);
		if ($this->isColumnModified(TblStructurePeer::F_STATUS)) $criteria->add(TblStructurePeer::F_STATUS, $this->f_status);
		if ($this->isColumnModified(TblStructurePeer::F_LAYOUT_ID)) $criteria->add(TblStructurePeer::F_LAYOUT_ID, $this->f_layout_id);
		if ($this->isColumnModified(TblStructurePeer::F_UPDATED_UID)) $criteria->add(TblStructurePeer::F_UPDATED_UID, $this->f_updated_uid);
		if ($this->isColumnModified(TblStructurePeer::F_UPDATED_DATETIME)) $criteria->add(TblStructurePeer::F_UPDATED_DATETIME, $this->f_updated_datetime);
		if ($this->isColumnModified(TblStructurePeer::F_CREATED_UID)) $criteria->add(TblStructurePeer::F_CREATED_UID, $this->f_created_uid);
		if ($this->isColumnModified(TblStructurePeer::F_CREATED_DATETIME)) $criteria->add(TblStructurePeer::F_CREATED_DATETIME, $this->f_created_datetime);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(TblStructurePeer::DATABASE_NAME);

		$criteria->add(TblStructurePeer::F_ID, $this->f_id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getFId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setFId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setCreatedOn($this->created_on);

		$copyObj->setUpdatedOn($this->updated_on);

		$copyObj->setFName($this->f_name);

		$copyObj->setFDescription($this->f_description);

		$copyObj->setFLevel($this->f_level);

		$copyObj->setFParentid($this->f_parentid);

		$copyObj->setFSeqNo($this->f_seq_no);

		$copyObj->setFImage($this->f_image);

		$copyObj->setFIcon($this->f_icon);

		$copyObj->setFContent($this->f_content);

		$copyObj->setFLink($this->f_link);

		$copyObj->setFMetaKeyword($this->f_meta_keyword);

		$copyObj->setFMetaDescription($this->f_meta_description);

		$copyObj->setFStatus($this->f_status);

		$copyObj->setFLayoutId($this->f_layout_id);

		$copyObj->setFUpdatedUid($this->f_updated_uid);

		$copyObj->setFUpdatedDatetime($this->f_updated_datetime);

		$copyObj->setFCreatedUid($this->f_created_uid);

		$copyObj->setFCreatedDatetime($this->f_created_datetime);


		$copyObj->setNew(true);

		$copyObj->setFId(NULL); 

	}

	
	public function copy($deepCopy = false)
	{
		
		$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new TblStructurePeer();
		}
		return self::$peer;
	}

} 